<!--
 * @Author: wangming
 * @Date: 2020-09-16 09:13:44
 * @LastEditors: wangming
 * @LastEditTime: 2022-04-08 13:59:48
 * @Description: file content
-->
<template>
  <div
    :style="{
      width: config.__config.width + '%',
      'min-height': '44px',
      color: config.__config.contentColor || '#666',
      'white-space': 'pre-line',
    }"
    class="g6 wb"
    :class="config.__config.contentBold ? 'content-bold' : ''"
  >
    {{ config.__config.content }}
  </div>
</template>
<script>
import myMixin from "@/pageComponents/myMixin";
import vmMixin from "@/pageComponents/vmMixin";
export default {
  mixins: [myMixin, vmMixin],
  vmEvents: {
    setExplainTitle(arg) {
      if (typeof arg === "object") {
        if (arg.hasOwnProperty("newValue")) {
          this.config.__config.content = arg.newValue;
        }
        if (arg.hasOwnProperty("color")) {
          this.config.__config.contentColor = arg.color;
        }
      } else {
        this.config.__config.content = arg;
      }
    },
  },
};
</script>
<style scoped>
.wb {
  word-break: break-all;
}
.content-bold {
  font-weight: bold;
}
</style>
